<template>
  <div>
    <div class="title">
      <div>
        <span>文字超出范围滚动，不超出不滚动</span>
      </div>
      <div>
        <span>vue</span>
      </div>
    </div>
    <div style="margin-top: 20px">
      <div style="width: 200px; background: red; color: white; margin-left: calc(50% - 100px)">
        <scroll-text :text="text"></scroll-text>
      </div>
    </div>
  </div>
</template>
<script>
import scrollText from './scrollText'
export default {
  components: {scrollText},
  data () {
    return {
      text: 'dddddddddddddddddd0aaaaaaaaaaaaaaaaaaaffffffffff'
    }
  }
}
</script>
<style scoped>
.title{
  text-align: center;
}
</style>
